package com.neuedu.corejava.ch7.homework3;

public class ComputerStudent extends Student {
	//操作能力
	private double operating;
	//写作
    private double writting;
    
    
	public ComputerStudent() {
	}
	public ComputerStudent(int studentId, String name, String sex, int age, double midtermGrade, double finalExamGrade) {
		super(studentId, name, sex, age, midtermGrade, finalExamGrade);
	}
	
	public ComputerStudent(int studentId, String name, String sex, int age, double midtermGrade, double finalExamGrade,double operating,double writting) {
		super(studentId, name, sex, age, midtermGrade, finalExamGrade);
	   this.operating=operating;
	   this.writting=writting;
	}




	public double getOperating() {
		return operating;
	}

	public void setOperating(double operating) {
		this.operating = operating;
	}

	public double getWritting() {
		return writting;
	}

	public void setWritting(double writting) {
		this.writting = writting;
	}


	@Override
	public double gradeAssessing() {
		double  grade = operating*0.4 + (writting+getFinalExamGrade()+getMidtermGrade())*0.2;
		
		return grade;
	}
	
	
	
    
    
}
